let f_circle = function (center, radius, options) {
    var earthRadius = 6371008.8;
  
    var factors = {
      centimeters: earthRadius * 100,
      centimetres: earthRadius * 100,
      degrees: earthRadius / 111325,
      feet: earthRadius * 3.28084,
      inches: earthRadius * 39.37,
      kilometers: earthRadius / 1000,
      kilometres: earthRadius / 1000,
      meters: earthRadius,
      metres: earthRadius,
      miles: earthRadius / 1609.344,
      millimeters: earthRadius * 1000,
      millimetres: earthRadius * 1000,
      nauticalmiles: earthRadius / 1852,
      radians: 1,
      yards: earthRadius * 1.0936,
    };
  
  
  
    function lengthToRadians(
      distance,
      units
    ) {
      const factor = factors[units];
      if (!factor) {
        throw new Error(units + " units is invalid");
      }
      return distance / factor;
    }
  
  
  
    function radiansToDegrees(radians) {
      const degrees = radians % (2 * Math.PI);
      return (degrees * 180) / Math.PI;
    }
  
    function degreesToRadians(degrees) {
      const radians = degrees % 360;
      return (radians * Math.PI) / 180;
    }
  
  
    function destination(origin, distance, bearing, options) {
      // Handle input
      const coordinates1 = origin; //= getCoord(origin);
      const longitude1 = degreesToRadians(coordinates1[0]);
      const latitude1 = degreesToRadians(coordinates1[1]);
      const bearingRad = degreesToRadians(bearing);
      const radians = lengthToRadians(distance, options.units);
  
      // Main
      const latitude2 = Math.asin(
        Math.sin(latitude1) * Math.cos(radians) +
        Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearingRad)
      );
      const longitude2 =
        longitude1 +
        Math.atan2(
          Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1),
          Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2)
        );
      const lng = radiansToDegrees(longitude2);
      const lat = radiansToDegrees(latitude2);
  
      return [lng, lat];
    }
  
    // default params
    const steps = options.steps;
    // main
    const coordinates = [];
    for (let i = 0; i < steps; i++) {
      coordinates.push(
        destination(center, radius, (i * -360) / steps, options)
      );
    }
    coordinates.push(coordinates[0]);
  
    return coordinates;
  }
  
  
  let utils = {
    //参数不确定
    printLog() {
  
      let date = new Date()
      let time = `[DataV地图 ${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()} ${date.getMilliseconds()}]`
      // if (arguments.length === 0) {
      console.log(time, '')
      // }
      // if (arguments.length === 1) {
      //   console.log(time, arguments[0])
      // }
      // if (arguments.length === 2) {
      //   console.log(time, arguments[0], arguments[1])
      // }
      // if (arguments.length === 3) {
      //   console.log(time, arguments[0], arguments[1], arguments[2])
      // }
      // if (arguments.length === 4) {
      //   console.log(time, arguments[0], arguments[1], arguments[2], arguments[3])
      // }
      // if (arguments.length === 5) {
      //   console.log(time, arguments[0], arguments[1], arguments[2], arguments[3], arguments[4])
      // }
      // if (arguments.length > 5) {
      //   console.warn('printLog方法参数过长')
      // }
    },
    compareObj(obj1, obj2) {
      let result = true
      let obj1Keys = Object.keys(obj1)
      let obj2Keys = Object.keys(obj2)
      let sameKeys = []
      obj1Keys.forEach(obj1Key => {
        let index = obj2Keys.findIndex(obj2Key => obj2Key === obj1Key)
        if (index !== -1) sameKeys.push(obj2Keys[index])
      })
      sameKeys.forEach(key => {
        if (obj2[key] !== obj1[key]) {
          result = false
          return;
        }
      })
      return result
    }
  }
  
  let initParameters =
    [
      {
        name: 'f_circle',
        value: f_circle
      },
      {
        name: 'utils',
        value: utils
      }
    ];
  let returnObj = {
    data: initParameters
  }
  
  return returnObj;